The Airy function is a solution of the differential equation
\begin{equation}
\frac{\partial^2 f}{\partial z^2} = zf \label{eq:Airy}\tag{1}
\end{equation}
It turns out that every solution to eq($\ref{eq:Airy}$) can be analytically continued to the whole complex plane.
To solve eq($\ref{eq:Airy}$) we take its Fourier transform $g(x)$. We get that $g(x)$ solves
$$\frac{\partial g}{\partial x} = ix^2g$$
The solution space of which is spanned by
$$g(x) = e^{ix^3/3}$$
Where $x$ is in general complex. To get back the Airy function we take the inverse Fourier transform.
\begin{align}
f(z) &= \int_\mathbb{C_R} \frac{dx}{2\pi}\, g(x)e^{izx}\\
&= \int_\mathbb{C_R} \frac{dx}{2\pi}\, e^{i\left(\frac{x^3}{3}+zx\right)}\label{eq:inv_four}\tag{2}
\end{align}
Where $C_\mathbb{R}$ is the contour that passes along the real line.
This integral will converge if the real part of the exponent becomes arbitrarily small towards the ends of $C_\mathbb{R}$
To see whether this happens, we draw a contour plot for the height function $h = Re(i(\frac{x^3}{3}+zx))$
If we take the contour of our integration to be $C_\mathbb{R}$, $x$ is real. As $|x|$ becomes large, the integrand
does not vanish, it remains oscillatory.
To make further progress we look at the regions where the real part decreases. We define (for real $T$)
$$Z_{\leq T} := \{x\in\mathbb{C}\vert h(x,z)\leq T\}$$
Note that for large $|x|$, h(x,z) ~ h(x). Therefore, for small enough $T$, $Z_{\leq T}$ does not depend on $z$.
We identify all the points in $Z_{\leq T}$ to create a topological space $\mathbb{C}/Z_{\leq T}$
Schematic of the quotient space, taken from Niklas Zorbach.
$Z_{\leq T}$ is marked green.
The first homology group of the quotient space $H_1\equiv H_1(\mathbb{C}/Z_{\leq T},\mathbb{Z})$ is a free abelian group of rank 2
generated by $C_{\gamma_1}$ and $C_{\gamma_2}$ shown in the above figure.
Since the integrand has no singularities at finite points continuously deforming it should not change the value of the integral, as long as the contour is a closed loop in $\mathbb{C}/Z_{\leq T}$.
We can now define generators for the space of solutions of eq($\ref{eq:Airy}$).
\begin{align}
\Ai(z) &= \int_{C_{\gamma_1}} \frac{dx}{2\pi} e^{i\left(\frac{x^3}{3}+zx\right)}\\
\Bi(z) &= \int_{C_{\gamma_2}} \frac{dx}{2\pi} e^{i\left(\frac{x^3}{3}+zx\right)} - \int_{C_{\gamma_3}}\frac{dx}{2\pi} e^{i\left(\frac{x^3}{3}+zx\right)}\\
\end{align}
Back to our integral in eq($\ref{eq:inv_four}$), we saw that using the contour $C_\mathbb{R}$ causes the integral to not converge. Although $[C_\mathbb{R}]$ is not an element of $H_1$ if we shift it by a small $i\epsilon$ ($\epsilon\in
\mathbb{R}^+$) we get
$[C_{\mathbb{R}+i\epsilon}] = [C_{\gamma_1}]$. Here $[C]$ denotes the equivalence class represented by the contour in the homology group. Because there are no singularities between them, the integral over both the contours are equal.
Asymptotic Analysis
For this section, we will be heavily borrowing concepts and notation from Niklas Zorbach
Our goal is to find the asymptotic behaviour of $\Ai(re^{i\phi})$ for $r\rightarrow\infty$. For $z$ not giving rise to a Stoke's ray, we proceed as follows (for this system $\phi\not\in \{0,\pm2\pi/3\}$).
For $z$ leading to Stoke's rays we can find a sequence $\langle z_n\rangle\rightarrow z$ where each $z_n$ does not lie on the Stoke's line. Their analysis then proceeds the same as below.
We first express the integral as
$$\Ai(z) = \int_{C_{\mathbb{R}+i\epsilon}}\frac{dz}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} = \sum_\sigma n_\sigma \int_{\mathcal{J}_\sigma}\frac{dz}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)}\label{eq:Ai}\tag{3}$$
where $\sigma$ are the critical points of $\mathcal{I}(x,z)=i\left(\frac{x^3}{3}+zx\right)$, $\sigma_\pm=\pm i\sqrt{z}$.
$n_\sigma=\langle C_{\mathbb{R}+i\epsilon},\mathcal{K}_\sigma\rangle$, where $\langle A,B\rangle$ is the number of intersections between the contours $A$ and $B$.
$\mathcal{J}_\sigma$ is the contour of steepest descent from $\sigma$ and $\mathcal{K}_\sigma$ is the contour of steepest ascent from $\sigma$.
To find the values of $n_\sigma$ for the various values of $z$, we have made the plots below.
The 3d surface shows the height function.
The red points are the critical points.
The blue lines are the lines of steepest descent ($\mathcal{J}_\sigma$).
The dashed red lines are the lines of steepest ascent ($\mathcal{K}_\sigma$).
The blue semi-transparent rectangle is so that we can count the number of intersections
our chosen contour (the real line) will have with the lines of steepest ascent.
The down arrow is just to indicate which graph corresponds to which values.
For $\phi \in [-\pi,-2\pi/3]$the contour intersects the lines of steepest ascent twice, once for each critical point.
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-1\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-0.8\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-\frac{2\pi}{3}$$
For $\phi > -\frac{2\pi}{3}$ the countour only intersects the steepest ascent line for only one point ($\sigma_+$).
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-0.5\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-0.3\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=-0.1\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=0$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=0.1\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=0.3\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=0.5\pi$$
$$\downarrow \; z = re^{i\phi}, r=1, \phi=\frac{2\pi}{3}$$
For $\phi\geq2\pi/3$ we again get two intersections.
$$\downarrow \; z = re^{i\phi}, r=1, \phi=0.8\pi$$
The values of $n_\sigma$ for $z$ not on a Stoke's line. The Stoke's lines are marked blue. Taken from Niklas Zorbach.
Using Laplace's method use get the asymptotic behaviour
$$\int_{\mathcal{J}_{\sigma_\pm}} \frac{dx}{2\pi}\, e^{i\left(\frac{x^3}{3}+zx\right)} \sim \frac{\lambda^{1/3}}{2}\sqrt{\frac{1}{-\lambda i y(\sigma_\pm)}} e^{i\lambda\left(\frac{y(\sigma_\pm)^3}{3}+e^{i\phi}y(\sigma_\pm)\right)}$$
where
$$y = \frac{x}{\sqrt{r}}\;\;; \lambda=r^{3/2}$$
We also have that, asymptotically
\begin{equation}
\int_{\mathcal{J}_{\sigma_+}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} +
\int_{\mathcal{J}_{\sigma_-}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} \sim
\begin{cases}
\int_{\mathcal{J}_{\sigma_+}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} & \text{if } h(\sigma_+,z) > h(\sigma_-,z)\\
\int_{\mathcal{J}_{\sigma_-}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} & \text{if } h(\sigma_-,z) > h(\sigma_+,z)\\
\int_{\mathcal{J}_{\sigma_+}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)}+\int_{\mathcal{J}_{\sigma_-}}\frac{dx}{2\pi}e^{i\left(\frac{x^3}{3}+zx\right)} & \text{otherwise}
\end{cases}
\end{equation}
We observe which critical point is more dominant across values of $z$ from the plots, the results are given below.
The regions of $z$ where one critical point dominates over the other. The anti-Stoke's lines are marked red.
Putting both of these results back in eq($\ref{eq:Ai}$) we get
\begin{equation}
\Ai(re^{i\phi})\sim \begin{cases}
\frac{1}{2\sqrt{\pi}}z^{-\frac{1}{4}}e^{-\frac{2}{3}\sqrt{z^3}} & \phi\in(-\pi,\pi)\\
\frac{1}{\sqrt{\pi}}z^{-\frac{1}{4}}\cos\left(\frac{2}{3}\sqrt{z^3}-\frac{\pi}{4}\right) & \phi = \pi
\end{cases}
\end{equation}
$\phi=\pi$ gets special treatment in asymptotic behaviour of $\Ai(z)$ since it the only anti-Stoke's line which lies in a region where both $\langle C_{\mathbb{R}+i\epsilon},\mathcal{K}_{\sigma_+}\rangle$ and
$\langle C_{\mathbb{R}+i\epsilon},\mathcal{K}_{\sigma_-}\rangle$ are non-zero.